<template>

  <div>
    <el-dialog
      title="详情"
      v-model="dialogVisible"
      @close="dialogFormVisible"
      :close-on-click-modal="false"
      :close-on-press-escape="false"
    >
      <el-form size="small" ref="form" :model="form">
        <el-form-item label="奖品名称" :label-width="formLabelWidth">
          {{ model.record_name }}
        </el-form-item>
        <el-form-item label="收件人" :label-width="formLabelWidth">
          {{ model.name }}
        </el-form-item>
        <el-form-item label="收件电话" :label-width="formLabelWidth">
          {{ model.phone }}
        </el-form-item>
        <el-form-item label="收件地址" :label-width="formLabelWidth">
          {{ model.region.province }}{{ model.region.city
          }}{{ model.region.region }}{{ model.detail }}
        </el-form-item>
        <el-form-item
          label="物流公司"
          :label-width="formLabelWidth"
          v-if="model.express"
        >
          {{ model.express.express_name }}
        </el-form-item>
        <el-form-item label="物流单号" :label-width="formLabelWidth">
          {{ model.express_no }}
        </el-form-item>
        <el-form-item label="发货时间" :label-width="formLabelWidth">
          {{ model.delivery_time }}
        </el-form-item>
      </el-form>
      <template #footer class="dialog-footer">
        <el-button @click="dialogFormVisible">关 闭</el-button>
      </template>
    </el-dialog>
  </div>
</template>
<script>
// import LotteryApi from "@/api/lottery.js";
import draggable from "vuedraggable";
export default {
  components: {
    draggable,
  },
  data() {
    return {
      loading: false,
      /*左边长度*/
      formLabelWidth: "120px",
      /*是否显示*/
      dialogVisible: false,
    };
  },
  props: ["open_detail", "model"],
  created() {
    this.dialogVisible = this.open_detail;
  },
  methods: {
    /*关闭弹窗*/
    dialogFormVisible(e) {
      if (e) {
        this.$emit("closeDialog", {
          type: "success",
          openDialog: false,
        });
      } else {
        this.$emit("closeDialog", {
          type: "error",
          openDialog: false,
        });
      }
    },
  },
};
</script>
<style lang="scss"></style>
